package com.yc.vote.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 投票系统-题目表-2
 * </p>
 *
 * @author baomidou
 * @since 2023-07-10
 */
@TableName("tp_vote")
@Data
public class TpVote implements Serializable {

    private static final long serialVersionUID = 1L;

    // 选项集合
    List<TpItems> items;
    // 投票人数
    int users;
    // 当前用户投票状态
    boolean voted;


      /**
     * 编号, 自增列
     */
        @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      /**
     * 标题
     */
      private String vname;

      /**
     * 类型: 单选, 多选
     */
      private String vtype;

      /**
     * 开始时间: 开始投票的时间
     */
      private LocalDate startDate;

      /**
     * 结束时间: 投票结束的时间
     */
      private LocalDate endDate;

    
    public Integer getId() {
        return id;
    }

      public void setId(Integer id) {
          this.id = id;
      }
    
    public String getVname() {
        return vname;
    }

      public void setVname(String vname) {
          this.vname = vname;
      }
    
    public String getVtype() {
        return vtype;
    }

      public void setVtype(String vtype) {
          this.vtype = vtype;
      }
    
    public LocalDate getStartDate() {
        return startDate;
    }

      public void setStartDate(LocalDate startDate) {
          this.startDate = startDate;
      }
    
    public LocalDate getEndDate() {
        return endDate;
    }

      public void setEndDate(LocalDate endDate) {
          this.endDate = endDate;
      }

    @Override
    public String toString() {
        return "TpVote{" +
              "id=" + id +
                  ", vname=" + vname +
                  ", vtype=" + vtype +
                  ", startDate=" + startDate +
                  ", endDate=" + endDate +
              "}";
    }
}
